function filePath =plotAER(T,baseName, satId, outputFolder)
    % PLOT AER visualization
    % Input:
    %   T - table with columns 'Time', 'Azimuth', 'Elevation', 'Range'

    % 检查输入表格是否包含所需的列
    requiredColumns = {'Time', 'Azimuth', 'Elevation', 'Range'};
    for i = 1:numel(requiredColumns)
        if ~ismember(requiredColumns{i}, T.Properties.VariableNames)
            error('Input table must contain the columns: Time, Azimuth, Elevation, Range');
        end
    end

    % 按时间列排序
    T = sortrows(T, 'Time');

    % 可视化AER
    fig=figure;

    % 左纵坐标：角度
    yyaxis left;
    plot(T.Time, T.Azimuth, 'r', 'DisplayName', 'Azimuth');
    hold on;
    plot(T.Time, T.Elevation, 'g', 'DisplayName', 'Elevation');
    ylabel('Angle (degrees)');
    legend('show');

    % 右纵坐标：距离
    yyaxis right;
    plot(T.Time, T.Range, 'b', 'DisplayName', 'Range');
    ylabel('Range (meters)');

    xlabel('Time');
    title('AER Visualization');
    grid on;
    filename = fullfile(outputFolder, ...
        sprintf('aer_plot_%s_sat%d.png', baseName, satId));

    % 确保输出目录存在
    if ~exist(outputFolder, 'dir')
        mkdir(outputFolder);
    end

    % 保存图像
    saveas(fig, filename);
    filePath=filename
    % 关闭图形窗口
    close(fig);
end
